###
# This software is provided 'as-is', without any express or implied
# warranty.  In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
# 
# 1. The origin of this software must not be misrepresented; you must not
#    claim that you wrote the original software. If you use this software
#    in a product, an acknowledgment in the product documentation would be
#    appreciated but is not required.
# 2. Altered source versions must be plainly marked as such, and must not be
#    misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.
#
# Note: Some of the libraries GMEngine may link to may have additional
# requirements or restrictions.
#
###

cmake_minimum_required(VERSION 2.8)
 
project(TextAdventure)

set(Rooms_HDRS
  ./GameObjects/Rooms/GloomyForest.h
  ./GameObjects/Rooms/DarkPath.h
)
SOURCE_GROUP("Header Files\\GameObjects\\Rooms" FILES ${Rooms_HDRS})

set(Rooms_SRCS
  ./GameObjects/Rooms/GloomyForest.cpp
  ./GameObjects/Rooms/DarkPath.cpp
)
SOURCE_GROUP("Source Files\\GameObjects\\Rooms" FILES ${Rooms_SRCS})

set(Items_HDRS
  ./GameObjects/Items/Stone.h
  ./GameObjects/Items/Knife.h
  ./GameObjects/Items/Corpse.h
)
SOURCE_GROUP("Header Files\\GameObjects\\Items" FILES ${Items_HDRS})

set(Items_SRCS
  ./GameObjects/Items/Stone.cpp
  ./GameObjects/Items/Knife.cpp
  ./GameObjects/Items/Corpse.cpp
)
SOURCE_GROUP("Source Files\\GameObjects\\Items" FILES ${Items_SRCS})

set(Characters_HDRS
  ./GameObjects/Characters/Wolf.h
)
SOURCE_GROUP("Header Files\\GameObjects\\Characters" FILES ${Characters_HDRS})

set(Characters_SRCS
  ./GameObjects/Characters/Wolf.cpp
)
SOURCE_GROUP("Source Files\\GameObjects\\Characters" FILES ${Characters_SRCS})

set(GameObjects_HDRS
  ./GameObjects/Room.h
  ./GameObjects/Exit.h
  ./GameObjects/Item.h
  ./GameObjects/Character.h
  ./GameObjects/World.h
)
SOURCE_GROUP("Header Files\\GameObjects" FILES ${GameObjects_HDRS})

set(GameObjects_SRCS
  ./GameObjects/Room.cpp
  ./GameObjects/Exit.cpp
  ./GameObjects/Item.cpp
  ./GameObjects/Character.cpp
  ./GameObjects/World.cpp
)
SOURCE_GROUP("Source Files\\GameObjects" FILES ${GameObjects_SRCS})

set(Commands_HDRS
  ./Commands/Movement.h
  ./Commands/Vision.h
  ./Commands/Collecting.h
  ./Commands/HoldItem.h
  ./Commands/ThrowItem.h
  ./Commands/ItemInventory.h
  ./Commands/UseBlade.h
)
SOURCE_GROUP("Header Files\\Commands" FILES ${Commands_HDRS})

set(Commands_SRCS
  ./Commands/Movement.cpp
  ./Commands/Vision.cpp
  ./Commands/Collecting.cpp
  ./Commands/HoldItem.cpp
  ./Commands/ThrowItem.cpp
  ./Commands/ItemInventory.cpp
  ./Commands/UseBlade.cpp
)
SOURCE_GROUP("Source Files\\Commands" FILES ${Commands_SRCS})

set(Components_HDRS
  ./Components/Weapon.h
  ./Components/Hands.h
  ./Components/Feet.h
  ./Components/Eyes.h
  ./Components/Pockets.h
  ./Components/Blade.h
  ./Components/Vitality.h
)
SOURCE_GROUP("Header Files\\Components" FILES ${Components_HDRS})

set(Components_SRCS
  ./Components/Weapon.cpp
  ./Components/Hands.cpp
  ./Components/Feet.cpp
  ./Components/Eyes.cpp
  ./Components/Pockets.cpp
  ./Components/Blade.cpp
  ./Components/Vitality.cpp
)
SOURCE_GROUP("Source Files\\Components" FILES ${Components_SRCS})

set(HDRS
  ${GameObjects_HDRS}
  ${Characters_HDRS}
  ${Items_HDRS}
  ${Rooms_HDRS}
  ${Commands_HDRS}
  ${Components_HDRS}
  ConsoleColor.h
  StringHelper.h
  GameObject.h
  Input.h
  Player.h
  Command.h
  CommandManager.h
  Component.h
  Random.h
  RoomManager.h
  ItemManager.h
  Time.h
)

set(SRCS
  ${GameObjects_SRCS}
  ${Characters_SRCS}
  ${Items_SRCS}
  ${Rooms_SRCS}
  ${Commands_SRCS}
  ${Components_SRCS}
  main.cpp
  StringHelper.cpp
  GameObject.cpp
  Input.cpp
  Player.cpp
  Command.cpp
  CommandManager.cpp
  Component.cpp
  Random.cpp
  RoomManager.cpp
  ItemManager.cpp
  Time.cpp
)
 
add_executable(TextAdventure ${HDRS} ${SRCS})
